package cn.com.hhrcw.web;

import cn.com.hhrcw.entity.EnInfo;
import cn.com.hhrcw.entity.PiInfo;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.jeecg.common.aspect.annotation.Dict;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @program: recruit-boot-parent
 * @description:
 * @author: JD
 * @create: 2020-11-27 15:24
 **/
@Data
public class EnInfoVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ID_WORKER_STR)
    private String id;

    private Boolean delFlag;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    private String updateBy;

    private String r1;

    private String r2;

    private String r3;

    private String r4;

    private String r5;

    private String r6;

    private String r7;

    /**
     * 企业名称
     */
    private String enName;

    /**
     * 企业LOGO
     */
    @Dict(dictTable = "file", dicCode = "id", dicText = "url")
    private String enLogo;

    /**
     * 所属行业
     */
    private String enTrade;

    /**
     * 企业性质
     */
    private String enNature;

    /**
     * 人员规模
     */
    private String enPersonnel;

    /**
     * 企业省
     */
    @Dict(dicCode = "id", dicText = "name", dictTable = "sys_area")
    private String province;

    /**
     * 企业市
     */
    @Dict(dicCode = "id", dicText = "name", dictTable = "sys_area")
    private String city;

    /**
     * 面试地点lng
     */
    private BigDecimal lng;

    /**
     * 面试地点lat
     */
    private BigDecimal lat;

    /**
     * 企业网址
     */
    private String address;

    /**
     * 公司介绍
     */
    private String introduce;

    /**
     * 工作开始时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private Date workStart;

    /**
     * 工作结束时间
     */
    @JsonFormat(timezone = "GMT+8", pattern = "HH:mm")
    private Date workEnd;

    /**
     * 加班情况
     */
    private String workOvertime;

    /**
     * 休息情况
     */
    private String rest;

    /**
     * 其他福利
     */
    private String otherWelfare;

    /**
     * 附件id
     */
    @Dict(dictTable = "file", dicCode = "id", dicText = "url",multiple = true)
    private String enPic;

    /**
     * 背景图
     */
    @Dict(dictTable = "file", dicCode = "id", dicText = "url")
    private String backgroundPic;

    /**
     * 企业地址
     */
    private String enAddress;

    /**
     * 审核状态0审核成功1未审核
     */
    private Integer state;

    /**
     * 是否自主注册 0否 1是
     */
    private Boolean actFlag;

    /**
     * 注册信息审核备注
     */
    private String remark;

    /**
     * 对公账号
     */
    private String account;

    /**
     * 开户行全称
     */
    private String bankName;

    /**
     * 营业执照
     */
    @Dict(dictTable = "file", dicCode = "id", dicText = "url",multiple = true)
    private String license;

    /**
     * 是否推荐0不推荐1推荐
     */
    private Integer recommendFlag;

    /**
     * 推荐序号
     */
    private Integer recommendSort;

    /**
     * 在招职位数
     */
    private Integer postNum;

    /**
     * 简历投递量
     */
    private Integer deliverNum;

    /**
     * 发聩率
     */
    private Integer rate;

    private String createBy;

    /**
     * 计划招聘人数 计划招聘人数 = 已入职人数 + 待招人数 仅统计在招职位
     */
    private Integer planCount;

    /**
     * 实际招聘人数 计划招聘人数 = 已入职人数 + 待招人数 仅统计在招职位
     */
    private Integer realCount;

    /**
     * 面试率 [扩展字段]
     */
    @TableField(exist = false)
    private BigDecimal interviewRate;

    /**
     * 入职率 [扩展字段]
     */
    @TableField(exist = false)
    private BigDecimal inductionRate;

    /**
     * 反馈率 [扩展字段]
     */
    @TableField(exist = false)
    private BigDecimal feedAck;

    /**
     * 企业邮箱
     */
    private String enMail;

    /**
     * 企业详情地址
     */
    private String enLocation;

    PiInfo piInfo;

    public EnInfoVO() {

    }

    public EnInfoVO(EnInfo params) {
        if (params != null) {
            this.setId(params.getId());
            this.setR1(params.getR1());
            this.setR2(params.getR2());
            this.setR3(params.getR3());
            this.setR4(params.getR4());
            this.setR5(params.getR5());
            this.setR6(params.getR6());
            this.setR7(params.getR7());
            this.setEnName(params.getEnName());
            this.setEnLogo(params.getEnLogo());
            this.setEnTrade(params.getEnTrade());
            this.setEnNature(params.getEnNature());
            this.setEnPersonnel(params.getEnPersonnel());
            this.setProvince(params.getProvince());
            this.setCity(params.getCity());
            this.setLng(params.getLng());
            this.setLat(params.getLat());
            this.setAddress(params.getAddress());
            this.setIntroduce(params.getIntroduce());
            this.setWorkStart(params.getWorkStart());
            this.setWorkEnd(params.getWorkEnd());
            this.setWorkOvertime(params.getWorkOvertime());
            this.setRest(params.getRest());
            this.setOtherWelfare(params.getOtherWelfare());
            this.setEnPic(params.getEnPic());
            this.setBackgroundPic(params.getBackgroundPic());
            this.setEnAddress(params.getEnAddress());
            this.setState(params.getState());
            this.setActFlag(params.getActFlag());
            this.setRemark(params.getRemark());
            this.setAccount(params.getAccount());
            this.setBankName(params.getBankName());
            this.setLicense(params.getLicense());
            this.setRecommendFlag(params.getRecommendFlag());
            this.setRecommendSort(params.getRecommendSort());
            this.setEnLocation(params.getEnLocation());
            if (params.getPostNum() != null) {
                this.setPostNum(params.getPostNum());
            }
            if (params.getDeliverNum() != null) {
                this.setDeliverNum(params.getDeliverNum());
            }
            if (params.getInterviewRate() != null) {
                this.setInterviewRate(params.getInterviewRate());
            }
            if (params.getInductionRate() != null) {
                this.setInductionRate(params.getInductionRate());
            }
            if (params.getFeedAck() != null) {
                this.setFeedAck(params.getFeedAck());
            }

        }

    }
}
